package cn.qihua.dao;

import java.util.List;

import org.hibernate.SessionFactory;

import cn.qihua.model.SysResource;

public interface ISysResourceDAO {

	// property constants
	public static final String TEXT = "text";
	public static final String TYPE = "type";
	public static final String URL = "url";
	public static final String PARENT_ID = "parentId";
	public static final String PARENT_IDS = "parentIds";
	public static final String PERMISSION = "permission";
	public static final String AVAILABLE = "available";

	public abstract void setSessionFactory(SessionFactory sessionFactory);

	public abstract void save(SysResource transientInstance);

	public abstract void delete(SysResource persistentInstance);

	public abstract SysResource findById(Integer id);

	public abstract List findByExample(SysResource instance);

	public abstract List findByProperty(String propertyName, Object value);

	public abstract List findByText(Object text);

	public abstract List findByType(Object type);

	public abstract List findByUrl(Object url);

	public abstract List findByParentId(Object parentId);

	public abstract List findByParentIds(Object parentIds);

	public abstract List findByPermission(Object permission);

	public abstract List findByAvailable(Object available);

	public abstract List findAll();

	public abstract SysResource merge(SysResource detachedInstance);

	public abstract void attachDirty(SysResource instance);

	public abstract void attachClean(SysResource instance);

}